package com.bicycle.rentalsystem.service.impl.user;

import com.bicycle.rentalsystem.dao.user.OnlineDao;
import com.bicycle.rentalsystem.dao.impl.user.OnlineDaoImpl;
import com.bicycle.rentalsystem.pojo.user.MessageInfo;
import com.bicycle.rentalsystem.service.user.OnlineService;

import java.util.List;

public class OnlineServiceImpl implements OnlineService {

    private OnlineDao onlineDao = new OnlineDaoImpl();

    @Override
    public List<MessageInfo> searchMessages() {
        return onlineDao.searchMessages();
    }

    @Override
    public int addMessage(String username, String message) {
        return onlineDao.addMessage(username,message);
    }
}
